package com.ra.landlord;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.googlecode.cswish.annotation.cm;


/**
 * 房东所购买的软件的数据信息
 * 
 * @author Jerry
 *
 */
@Entity
@Table(name = "ra_landlordstat")
public class LandlordPurchaseInfo {

	@cm("短信消息条数")
	public final static Integer TYPE_MESSAGE = 1;
	
	@cm("管理员人数")
	public final static Integer TYPE_ADMIN = 2;
	
	private Integer id;
	
	private LandlordUser landlordUser;
	
	// 数目
	private Integer count;
	
	// 类型: 短信:1, 管理员:2
	private Integer type;
	
	private String remark;
	
	@Id
	@GeneratedValue
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}
	
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name = "user_id")
	public LandlordUser getLandlordUser() {
		return landlordUser;
	}

	public void setLandlordUser(LandlordUser landlordUser) {
		this.landlordUser = landlordUser;
	}

	@Column(name = "user_info_count")
	public Integer getCount() {
		return count;
	}

	public void setCount(Integer count) {
		this.count = count;
	}

	@Column(name = "type")
	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	@Column(name = "notice")
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}
}
